﻿package view.tips
{
    import __AS3__.vec.*;
    import com.core.*;
    import com.sh.game.util.*;
    import flash.utils.*;
    import morn.core.components.*;
    import morn.core.handlers.*;
    import uiresource.tips.*;

    public class ArmTipsGame extends ArmTipsUI
    {
        private var propertyStrObj:Object;
        private var allArms:Object;
        private var Data:Object;
        private const headHight:int = 97;
        private const linesize:int = 4;
        private var _nextY:int = 0;
        private var _tempfj:Vector.<Object>;
        private var fjarr:Array;
        private var cfgQianghua:Array;
        private var cfgjade:Array;
        private const singhight:int = 16;
        private var strengthenAttributes:Array;
        private var strengthenAdd:Object;
        private var imgindex:int;
        private var arr:Array;

        public function ArmTipsGame()
        {
            this.propertyStrObj = {fmgj:"攻击", fmbj:"暴击", fmfy:"防御", fmhp:"生命", fmmp:"魔法", fmrhp:"生命恢复", fmrmp:"魔法恢复", fmrecover:"负面恢复", fmaccurate:"命中", fmdodge:"闪避", fmspeed:"速度"};
            this.fjarr = ConfigDictionary.data.superplus;
            this.cfgQianghua = ConfigDictionary.data.armadd;
            this.cfgjade = ConfigDictionary.data.jade;
            this.strengthenAttributes = [];
            this.strengthenAdd = {};
            this.arr = ConfigDictionary.data.armadd;
            this.mouseChildren = false;
            this.mouseEnabled = false;
            this.strengthenAttributes[1] = new Object();
            this.strengthenAttributes[1]["phyAttMax"] = "物理攻击: +s";
            this.strengthenAttributes[1]["magicAttMax"] = "魔法攻击: +s";
            this.strengthenAttributes[1]["taoAttMax"] = "道术攻击: +s";
            this.strengthenAttributes[2] = new Object();
            this.strengthenAttributes[2]["phyDefMax"] = "物理防御: +s";
            this.strengthenAttributes[2]["magicDefMax"] = "魔法防御: +s";
            this.strengthenAttributes[3] = "暴    击: +s";
            this.strengthenAttributes[4] = "暴击伤害: +s%";
            this.strengthenAttributes[5] = "攻击速度: +s";
            this.strengthenAttributes[6] = "敏    捷: +s";
            this.strengthenAttributes[7] = "准    确: +s";
            this.strengthenAttributes[8] = "生命恢复: +s";
            this.strengthenAttributes[9] = "魔法恢复: +s";
            this.strengthenAttributes[10] = "物理攻击: +s";
            this.strengthenAdd["attmaxadd"] = new Object();
            this.strengthenAdd["attmaxadd"]["attadd"] = "物攻: +";
            this.strengthenAdd["attmaxadd"]["defadd"] = "物防: +";
            this.strengthenAdd["attmaxadd"]["hpadd"] = "生命: +";
            this.strengthenAdd["attmaxadd"]["mpadd"] = "魔法: +";
            return;
        }// end function

        private function getuplevel(param1:Object) : Boolean
        {
            return param1.level >= 40 || param1.reinlv > 0;
        }// end function

        private function getuprein(param1:Object) : Boolean
        {
            return param1.reinlv > 0;
        }// end function

        override protected function initializeView() : void
        {
            super.initializeView();
            arm_msg.fi.flagshow = false;
            return;
        }// end function

        public function set data(param1:Object) : void
        {
            var _loc_2:int = 0;
            var _loc_3:Object = null;
            var _loc_8:Object = null;
            var _loc_11:Array = null;
            var _loc_12:int = 0;
            var _loc_13:int = 0;
            var _loc_14:Array = null;
            var _loc_15:int = 0;
            var _loc_16:int = 0;
            var _loc_17:String = null;
            var _loc_18:int = 0;
            var _loc_19:int = 0;
            var _loc_20:int = 0;
            var _loc_21:int = 0;
            var _loc_22:int = 0;
            var _loc_23:int = 0;
            var _loc_24:int = 0;
            var _loc_25:Array = null;
            var _loc_26:String = null;
            var _loc_27:int = 0;
            var _loc_28:Date = null;
            if (param1 is Array)
            {
                this.Data = param1[0];
                this.allArms = param1[1];
                param1 = param1[0];
            }
            else
            {
                this.Data = param1;
                this.allArms = null;
            }
            arm_msg.fi.data = param1;
            arm_msg.fi.changeSuperLvXY(25, 3);
            onarm.visible = param1.wear == 1;
            if (param1.leixing == "玉佩")
            {
                _loc_3 = ModelProxy.getValue("data", "arms");
                if (_loc_3[16] && _loc_3[16].itemid == param1.itemid)
                {
                    onarm.visible = true;
                }
                else
                {
                    onarm.visible = false;
                }
            }
            arm_msg.txt_name.text = "<font color=\'" + MColor.getqualitycolor(param1.quality) + "\'>" + param1.name + "</font>";
            arm_msg.txt_state.text = param1.bind == 1 ? ("<font color=\'" + MColor.Newstr54 + "\'>[绑定]</font>") : ("");
            var _loc_4:* = UserData.getUserData();
            var _loc_5:String = "";
            var _loc_6:* = ConfigDictionary.data.item[param1.itemid];
            _loc_5 = _loc_5 + ("<font color = \'" + MColor.Newstr64 + "\'>类型：</font>" + MColor.getHMTL(_loc_6.leixing, 59));
            if (param1.uselv > 0)
            {
                _loc_5 = _loc_5 + ("<br><font color = \'" + MColor.Newstr64 + "\'>等级：</font><font color=\'" + (_loc_4.level >= param1.uselv ? (MColor.Newstr65) : (MColor.Newstr54)) + "\'>" + int(param1.uselv) + "级</font>");
            }
            else
            {
                _loc_5 = _loc_5 + ("<br><font color = \'" + MColor.Newstr64 + "\'>转生：</font><font color=\'" + (_loc_4.rein >= _loc_6.reinlv ? (MColor.Newstr65) : (MColor.Newstr54)) + "\'>" + int(param1.reinlv) + "转</font>");
            }
            _loc_5 = _loc_5 + ("<br><font color = \'" + MColor.Newstr64 + "\'>职业：</font><font color=\'" + (param1.career == 0 ? (MColor.Newstr65) : (param1.career == _loc_4.career ? (MColor.Newstr65) : (MColor.Newstr54))) + "\'>" + UIGlobel.getCareer(param1.career) + "</font>");
            _loc_5 = _loc_5 + ("<br><font color = \'" + MColor.Newstr64 + "\'>性别：</font><font color=\'" + (param1.sex == 2 ? (MColor.Newstr65) : (param1.sex == _loc_4.sex ? (MColor.Newstr65) : (MColor.Newstr54))) + "\'>" + UIGlobel.getSex(param1.sex) + "</font>");
            arm_msg.txt_msg.text = _loc_5;
            this._nextY = this.headHight + this.linesize + jibenLabel.height;
            if (this.getuplevel(param1) && param1.cls < 17)
            {
                _loc_11 = [];
                if (int(param1.superlevel) <= 10)
                {
                    _loc_12 = 0;
                    while (_loc_12 < int(param1.superlevel))
                    {
                        
                        if (param1.cls == 16)
                        {
                            if (this.cfgjade[param1.itemid].qhlv)
                            {
                                param1.superlevel = int(this.cfgjade[param1.itemid].qhlv);
                            }
                        }
                        _loc_11.push({star:"png.common.star"});
                        _loc_12++;
                    }
                }
                else
                {
                    _loc_2 = 10;
                    while (_loc_2 < int(param1.superlevel))
                    {
                        
                        _loc_11.push({star:"png.common.qh1"});
                        _loc_2++;
                    }
                }
                if (int(param1.superlevel) == 0)
                {
                    arm_strengthen.visible = false;
                }
                else
                {
                    arm_strengthen.list_star.array = _loc_11;
                    arm_strengthen.list_star.repeatX = _loc_11.length;
                    arm_strengthen.visible = true;
                    this._nextY = this._nextY + (arm_strengthen.height + this.linesize);
                }
            }
            else
            {
                arm_strengthen.visible = false;
            }
            jibenLabel.text = "基础属性";
            jibenLabel.color = MColor.New50;
            jibenLabel.y = this._nextY - jibenLabel.height;
            arm_baseAttribute.color = MColor.New59;
            arm_baseAttribute.text = this.getAttribute(param1);
            arm_baseAttribute.y = this._nextY;
            this._nextY = this._nextY + arm_baseAttribute.height;
            line_forBase.y = this._nextY;
            this._nextY = this._nextY + this.linesize;
            list.visible = true;
            list.y = arm_baseAttribute.y;
            var _loc_7:* = UserData.getUserData("career");
            if (param1.career != _loc_7)
            {
                list.visible = false;
            }
            if (param1.career == _loc_7)
            {
                _loc_13 = param1.cls;
                _loc_3 = ModelProxy.getValue("data", "arms");
                if (_loc_3[_loc_13])
                {
                    if (param1.wear == 1)
                    {
                        list.visible = param1.wear == 0;
                        if (ModelProxy.getValue("data", "baglevel"))
                        {
                            list.visible = true;
                            _loc_15 = ModelProxy.getValue("data", "baglevel");
                            if (param1.reinlv > 0)
                            {
                                this.imgindex = 1;
                            }
                            else
                            {
                                if (_loc_15 > param1.level)
                                {
                                    this.imgindex = -1;
                                }
                                if (_loc_15 == param1.level)
                                {
                                    this.imgindex = 0;
                                }
                                if (_loc_15 < param1.level)
                                {
                                    this.imgindex = 1;
                                }
                            }
                            ModelProxy.change("data", "baglevel", null);
                        }
                        if (ModelProxy.getValue("data", "bagreinlv"))
                        {
                            list.visible = true;
                            _loc_16 = ModelProxy.getValue("data", "bagreinlv");
                            if (_loc_16 > param1.reinlv)
                            {
                                this.imgindex = -1;
                            }
                            if (_loc_16 == param1.reinlv)
                            {
                                this.imgindex = 0;
                            }
                            if (_loc_16 < param1.reinlv)
                            {
                                this.imgindex = 1;
                            }
                            ModelProxy.change("data", "bagreinlv", null);
                        }
                    }
                    else
                    {
                        if (param1.reinlv == 0 && _loc_3[_loc_13].reinlv == 0)
                        {
                            if (_loc_3[_loc_13].level > param1.level)
                            {
                                this.imgindex = -1;
                            }
                            if (_loc_3[_loc_13].level == param1.level)
                            {
                                this.imgindex = 0;
                            }
                            if (_loc_3[_loc_13].level < param1.level)
                            {
                                this.imgindex = 1;
                            }
                        }
                        else if (param1.reinlv > 0 && _loc_3[_loc_13].reinlv == 0)
                        {
                            this.imgindex = 1;
                        }
                        else if (param1.reinlv == 0 && _loc_3[_loc_13].reinlv > 0)
                        {
                            this.imgindex = -1;
                        }
                        else if (param1.reinlv > 0 && _loc_3[_loc_13].reinlv > 0)
                        {
                            if (_loc_3[_loc_13].reinlv > param1.reinlv)
                            {
                                this.imgindex = -1;
                            }
                            if (_loc_3[_loc_13].level == param1.reinlv)
                            {
                                this.imgindex = 0;
                            }
                            if (_loc_3[_loc_13].reinlv < param1.reinlv)
                            {
                                this.imgindex = 1;
                            }
                        }
                        if (param1.reinlv > 0)
                        {
                            ModelProxy.change("data", "bagreinlv", param1.reinlv);
                        }
                        else
                        {
                            ModelProxy.change("data", "baglevel", param1.level);
                        }
                    }
                }
                else
                {
                    this.imgindex = 0;
                }
                _loc_14 = this.getAttribute(param1).split("\n");
                _loc_2 = 0;
                while (_loc_2 < _loc_14.length)
                {
                    
                    if (_loc_14[_loc_2] == "")
                    {
                        _loc_14.splice(_loc_2, 1);
                    }
                    _loc_2++;
                }
                list.array = _loc_14;
                list.repeatY = _loc_14.length;
                list.spaceY = 2;
                list.renderHandler = new Handler(this.comlistrender);
            }
            arm_Duanzao.visible = false;
            line_forDuanzao.visible = false;
            if (param1.superlevel > 0)
            {
                arm_strengthenAttribute.visible = true;
                _loc_17 = "";
                _loc_18 = 0;
                _loc_23 = 1;
                while (_loc_23 <= param1.superlevel)
                {
                    
                    _loc_19 = _loc_19 + int(this.cfgQianghua[param1.level + "#" + _loc_23].attadd);
                    _loc_20 = _loc_20 + int(this.cfgQianghua[param1.level + "#" + _loc_23].defadd);
                    _loc_21 = _loc_21 + int(this.cfgQianghua[param1.level + "#" + _loc_23].hpadd);
                    _loc_22 = _loc_22 + int(this.cfgQianghua[param1.level + "#" + _loc_23].mpadd);
                    _loc_23++;
                }
                if (_loc_19 > 0)
                {
                    _loc_24 = UserData.getUserData("career");
                    if (int(param1.career) == 1 || _loc_24 == 1)
                    {
                        _loc_17 = _loc_17 + ("物理攻击: +" + String(_loc_19) + "\n");
                    }
                    else if (int(param1.career) == 2 || _loc_24 == 2)
                    {
                        _loc_17 = _loc_17 + ("魔法攻击: +" + String(_loc_19) + "\n");
                    }
                    else if (int(param1.career) == 3 || _loc_24 == 3)
                    {
                        _loc_17 = _loc_17 + ("道术攻击: +" + String(_loc_19) + "\n");
                    }
                    _loc_18 = _loc_18 + this.singhight;
                }
                if (_loc_20 > 0)
                {
                    _loc_17 = _loc_17 + (this.strengthenAdd["attmaxadd"]["defadd"] + String(_loc_20) + "\n");
                    _loc_18 = _loc_18 + this.singhight;
                }
                if (_loc_21 > 0)
                {
                    _loc_17 = _loc_17 + (this.strengthenAdd["attmaxadd"]["hpadd"] + String(_loc_21) + "\n");
                    _loc_18 = _loc_18 + this.singhight;
                }
                if (_loc_22 > 0)
                {
                    _loc_17 = _loc_17 + (this.strengthenAdd["attmaxadd"]["mpadd"] + String(_loc_22) + "\n");
                    _loc_18 = _loc_18 + this.singhight;
                }
                arm_strengthenAttribute.y = this._nextY;
                arm_strengthenAttribute.txt_type.text = "(强化+" + param1.superlevel + ")";
                arm_strengthenAttribute.txt_type.color = MColor.New50;
                arm_strengthenAttribute.txt_msg.color = "0xfad029";
                arm_strengthenAttribute.txt_msg.height = _loc_18;
                arm_strengthenAttribute.txt_msg.text = _loc_17;
                arm_strengthenAttribute.txt_msg.color = "0xe19f21";
                this._nextY = this._nextY + (arm_strengthenAttribute.height + this.linesize * 2);
            }
            else
            {
                arm_strengthenAttribute.visible = false;
            }
            this._tempfj = new Vector.<Object>;
            for each (_loc_8 in this.fjarr)
            {
                
                if (_loc_8.aid == param1.itemid)
                {
                    this._tempfj.push(_loc_8);
                }
            }
            if (this._tempfj.length > 0)
            {
                arm_strengthActivation.visible = true;
                arm_strengthActivation.txt_other.visible = false;
                arm_strengthActivation.y = this._nextY;
                arm_strengthActivation.txt_type.color = MColor.New50;
                arm_strengthActivation.txt_type.text = "可激活属性";
                arm_strengthActivation.txt_msg.color = MColor.New59;
                this.getStrengthenAttribute(param1);
                this._nextY = this._nextY + arm_strengthActivation.height;
            }
            else
            {
                arm_strengthActivation.visible = false;
            }
            if (param1.superlevel > 0 || this._tempfj.length > 0)
            {
                line_forStrengthen.y = this._nextY;
                line_forStrengthen.visible = true;
            }
            else
            {
                line_forStrengthen.visible = false;
            }
            this._nextY = this._nextY + this.linesize;
            line_forAppraisal.visible = false;
            arm_appraisal.visible = false;
            var _loc_9:String = "";
            if (param1.tips1 != "")
            {
                _loc_9 = "<font color = \'" + MColor.Newstr64 + "\'>" + param1.tips1 + "</font>\n";
                _loc_9 = _loc_9 + "\n";
            }
            var _loc_10:* = ConfigDictionary.data.recycle[param1.itemid];
            if (ConfigDictionary.data.recycle[param1.itemid])
            {
                if (_loc_10.num == 0)
                {
                    _loc_9 = _loc_9 + ("<font color=\'" + MColor.Newstr65 + "\'>回收可获得：" + _loc_10.exp + "经验</font>\n");
                }
                else
                {
                    _loc_9 = _loc_9 + ("<font color=\'" + MColor.Newstr65 + "\'>回收可获得：" + _loc_10.exp + "经验+" + _loc_10.num + "护盾结晶</font>\n");
                }
            }
            if (param1.uniondonate && this.getuplevel(param1))
            {
                if (param1.suitid > 0)
                {
                    _loc_9 = _loc_9 + ("<font color=\'" + MColor.Newstr77 + "\'>集齐神套装可获得内功免伤、回复加成</font>\n");
                }
                _loc_25 = (param1.uniondonate as String).split("#");
                if (_loc_25 != null && _loc_25.length > 0)
                {
                    if (param1.hasOwnProperty("isUnionCk"))
                    {
                        _loc_9 = _loc_9 + ("<font color=\'" + MColor.Newstr65 + "\'>兑换消耗：" + _loc_25[0] + "个人贡献</font>\n");
                    }
                    else
                    {
                        _loc_9 = _loc_9 + ("<font color=\'" + MColor.Newstr65 + "\'>捐行会可得：" + _loc_25[0] + "个人贡献</font>\n");
                    }
                }
            }
            arm_desc.y = this._nextY;
            arm_desc.text = _loc_9;
            if (param1.timeout > 0)
            {
                _loc_26 = "";
                _loc_27 = int((ModelProxy.getValue("data", "servertime") + Number(getTimer())) / 1000);
                _loc_28 = new Date(param1.timeout - _loc_27 * 1000);
                if ((_loc_28.getUTCDate() - 1) > 0)
                {
                    _loc_26 = _loc_26 + ((_loc_28.getUTCDate() - 1) + "天");
                }
                if (_loc_28.getUTCHours() > 0)
                {
                    _loc_26 = _loc_26 + (_loc_28.getUTCHours() + "小时");
                }
                if (_loc_28.getMinutes() > 0)
                {
                    _loc_26 = _loc_26 + (_loc_28.getMinutes() + "分");
                }
                if (_loc_28.getSeconds() > 0)
                {
                    _loc_26 = _loc_26 + (_loc_28.getSeconds() + "秒");
                }
                arm_desc.text = arm_desc.text + ("<font color=\'#54b436\'>生效时间:" + _loc_26 + "</font>");
            }
            this._nextY = this._nextY + (arm_desc.height + this.linesize * 4);
            bg.height = this._nextY;
            return;
        }// end function

        private function comlistrender(param1:Component, param2:int) : void
        {
            var _loc_3:* = param1.getChildByName("img") as Image;
            if (this.imgindex == 1)
            {
                _loc_3.url = "png.common.unupp";
            }
            else if (this.imgindex == 0)
            {
                _loc_3.visible = false;
            }
            else
            {
                _loc_3.url = "png.common.undownp";
            }
            return;
        }// end function

        private function getArm_appraisal(param1:Object) : void
        {
            var _loc_7:int = 0;
            var _loc_8:int = 0;
            var _loc_9:int = 0;
            var _loc_2:* = param1.appraisal;
            var _loc_3:String = "";
            var _loc_4:String = "";
            var _loc_5:int = 0;
            var _loc_6:int = 0;
            while (_loc_6 < _loc_2.length)
            {
                
                _loc_7 = _loc_2[_loc_6] >> 16 & 15;
                _loc_8 = _loc_2[_loc_6] & 65535;
                _loc_9 = _loc_2[_loc_6] >> 20;
                if (_loc_8 > 0)
                {
                    if (_loc_7 == 7)
                    {
                        _loc_3 = _loc_3 + (this.getName(_loc_7) + "+" + String(_loc_8 / 100) + "%" + "\n");
                    }
                    else
                    {
                        _loc_3 = _loc_3 + (this.getName(_loc_7) + "+" + _loc_8 + "\n");
                    }
                    _loc_4 = _loc_4 + ("<font color=\'" + this.getAppraisalColor(_loc_9) + "\'>" + _loc_9 + "星</font>\n");
                    _loc_5 = _loc_5 + this.singhight;
                }
                _loc_6++;
            }
            arm_appraisal.txt_msg.height = _loc_5;
            arm_appraisal.txt_msg.text = _loc_3;
            arm_appraisal.txt_other.text = _loc_4;
            return;
        }// end function

        private function getStrengthenAttribute(param1:Object) : void
        {
            var _loc_7:Object = null;
            var _loc_8:String = null;
            var _loc_9:String = null;
            var _loc_2:* = MColor.Newstr58;
            var _loc_3:String = "#4ba0de";
            var _loc_4:String = "";
            var _loc_5:String = "";
            var _loc_6:int = 0;
            for each (_loc_7 in this._tempfj)
            {
                
                _loc_8 = param1.superlevel > 0 && int(param1.superlevel) >= int(_loc_7.lv) ? (_loc_3) : (_loc_2);
                if (_loc_7.type == 1 || _loc_7.type == 2)
                {
                    for (_loc_9 in this.strengthenAttributes[_loc_7.type])
                    {
                        
                        if (param1[_loc_9] > 0)
                        {
                            if (_loc_7.value < 10)
                            {
                                _loc_5 = "<font color = \'" + _loc_8 + "\'>" + this.strengthenAttributes[_loc_7.type][_loc_9] + "  (强化+" + _loc_7.lv + ")</font><br>";
                            }
                            else
                            {
                                _loc_5 = "<font color = \'" + _loc_8 + "\'>" + this.strengthenAttributes[_loc_7.type][_loc_9] + " (强化+" + _loc_7.lv + ")</font><br>";
                            }
                            _loc_4 = _loc_4 + _loc_5.replace("s", _loc_7.value);
                        }
                    }
                }
                else
                {
                    if (_loc_7.value < 10)
                    {
                        _loc_5 = "<font color = \'" + _loc_8 + "\'>" + this.strengthenAttributes[_loc_7.type] + "  (强化+" + _loc_7.lv + ")</font><br>";
                    }
                    else
                    {
                        _loc_5 = "<font color = \'" + _loc_8 + "\'>" + this.strengthenAttributes[_loc_7.type] + " (强化+" + _loc_7.lv + ")</font><br>";
                    }
                    _loc_4 = _loc_4 + _loc_5.replace("s", _loc_7.value);
                }
                _loc_6 = _loc_6 + this.singhight;
            }
            arm_strengthActivation.txt_msg.height = _loc_6;
            arm_strengthActivation.txt_msg.text = _loc_4;
            return;
        }// end function

        public function getAttribute(param1:Object) : String
        {
            var _loc_2:String = "";
            if (param1.phyAttMax > 0)
            {
                _loc_2 = _loc_2 + ("物理攻击: " + param1.phyAtt + " - " + param1.phyAttMax + "\n");
            }
            if (param1.magicAttMax > 0)
            {
                _loc_2 = _loc_2 + ("魔法攻击: " + param1.magicAtt + " - " + param1.magicAttMax + "\n");
            }
            if (param1.taoAttMax > 0)
            {
                _loc_2 = _loc_2 + ("道术攻击: " + param1.taoAtt + " - " + param1.taoAttMax + "\n");
            }
            if (param1.pureatk > 0)
            {
                _loc_2 = _loc_2 + ("混乱攻击: " + param1.pureatk + "\n");
            }
            if (param1.phyDefMax > 0)
            {
                _loc_2 = _loc_2 + ("物理防御: " + param1.phyDef + " - " + param1.phyDefMax + "\n");
            }
            if (param1.magicDefMax > 0)
            {
                _loc_2 = _loc_2 + ("魔法防御: " + param1.magicDef + " - " + param1.magicDefMax + "\n");
            }
            if (param1.puredef > 0)
            {
                _loc_2 = _loc_2 + ("混乱防御: " + param1.puredef + "\n");
            }
            if (param1.hp > 0)
            {
                _loc_2 = _loc_2 + ("血量上限: " + String(int(param1.hp) / 100) + "%\n");
            }
            if (param1.mp > 0)
            {
                _loc_2 = _loc_2 + ("魔法上限: " + String(int(param1.mp) / 100) + "%\n");
            }
            if (param1.luck > 0)
            {
                _loc_2 = _loc_2 + ("<font color=\'#ff0000\'>幸    运: +" + param1.luck + "</font>\n");
            }
            if (param1.critdmg > 0)
            {
                _loc_2 = _loc_2 + ("<font color=\'#ff0000\'>暴击伤害: +" + param1.critdmg + "</font>\n");
            }
            else if (param1.critRate > 0)
            {
                _loc_2 = _loc_2 + ("<font color=\'#ff0000\'>暴击伤害: +" + String(int(param1.critRate) / 100) + "%</font>\n");
            }
            if (param1.critical > 0)
            {
                _loc_2 = _loc_2 + ("<font color=\'#ff0000\'>暴    击: +" + param1.critical + "</font>\n");
            }
            if (param1.attackSpeed > 0)
            {
                _loc_2 = _loc_2 + ("<font color=\'#ff0000\'>攻击速度:+" + param1.attackSpeed + "</font>\n");
            }
            if (param1.pkatt > 0)
            {
                _loc_2 = _loc_2 + ("<font color=\'#ff0000\'>PK伤害: +" + int(param1.pkatt / 100) + "%</font>\n");
            }
            if (param1.pkdef > 0)
            {
                _loc_2 = _loc_2 + ("<font color=\'#ff0000\'>PK免伤: +" + int(param1.pkdef / 100) + "%</font>\n");
            }
            if (param1.neili > 0)
            {
                _loc_2 = _loc_2 + ("<font color=\'#ff0000\'>内    力:+" + param1.neili + "</font>\n");
            }
            return _loc_2;
        }// end function

        private function getName(param1:int) : String
        {
            var _loc_2:String = "";
            switch(param1)
            {
                case 1:
                {
                    _loc_2 = "攻击上限:";
                    break;
                }
                case 2:
                {
                    _loc_2 = "攻击下限:";
                    break;
                }
                case 3:
                {
                    _loc_2 = "物防上限:";
                    break;
                }
                case 4:
                {
                    _loc_2 = "物防下限:";
                    break;
                }
                case 5:
                {
                    _loc_2 = "魔防上限:";
                    break;
                }
                case 6:
                {
                    _loc_2 = "魔防下限:";
                    break;
                }
                case 7:
                {
                    _loc_2 = "生命加成:";
                    break;
                }
                default:
                {
                    break;
                    break;
                }
            }
            return _loc_2;
        }// end function

        private function getAppraisalColor(param1:int) : String
        {
            var _loc_2:String = "";
            switch(param1)
            {
                case 1:
                case 2:
                {
                    _loc_2 = MColor.getqualitycolor(1);
                    break;
                }
                case 3:
                case 4:
                {
                    _loc_2 = MColor.getqualitycolor(2);
                    break;
                }
                case 5:
                case 6:
                case 7:
                {
                    _loc_2 = MColor.getqualitycolor(3);
                    break;
                }
                case 8:
                case 9:
                {
                    _loc_2 = MColor.getqualitycolor(4);
                    break;
                }
                case 910:
                {
                    _loc_2 = MColor.getqualitycolor(5);
                    break;
                }
                default:
                {
                    break;
                    break;
                }
            }
            return _loc_2;
        }// end function

        private function showDuanzao(param1:Object) : String
        {
            var _loc_2:String = "";
            if (param1.hp > 0 && this.getMaxAdd(param1, 3) > 0)
            {
                _loc_2 = _loc_2 + ("血量上限:           (+" + this.getMaxAdd(param1, 3) + ")\n");
            }
            if (param1.mp > 0 && this.getMaxAdd(param1, 4) > 0)
            {
                _loc_2 = _loc_2 + ("魔法上限:           (+" + this.getMaxAdd(param1, 4) + ")\n");
            }
            if (param1.phyAttMax > 0 && this.getMaxAdd(param1) > 0)
            {
                _loc_2 = _loc_2 + ("物理攻击:           (+" + this.getMaxAdd(param1) + ")\n");
            }
            if (param1.magicAttMax > 0 && this.getMaxAdd(param1) > 0)
            {
                _loc_2 = _loc_2 + ("魔法攻击:           (+" + this.getMaxAdd(param1) + ")\n");
            }
            if (param1.taoAttMax > 0 && this.getMaxAdd(param1) > 0)
            {
                _loc_2 = _loc_2 + ("道术攻击:           (+" + this.getMaxAdd(param1) + ")\n");
            }
            if (param1.phyDefMax > 0 && this.getMaxAdd(param1, 2) > 0)
            {
                _loc_2 = _loc_2 + ("物理防御:           (+" + this.getMaxAdd(param1, 2) + ")\n");
            }
            if (param1.magicDefMax > 0 && this.getMaxAdd(param1, 2) > 0)
            {
                _loc_2 = _loc_2 + ("魔法防御:           (+" + this.getMaxAdd(param1, 2) + ")\n");
            }
            return _loc_2;
        }// end function

        private function getMaxAdd(param1:Object, param2:int = 1) : int
        {
            var _loc_5:int = 0;
            var _loc_3:* = param1.level + "#" + param1.cls;
            var _loc_4:int = 0;
            if (this.arr[_loc_3])
            {
                _loc_5 = 1;
                while (_loc_5 <= param1.superlevel)
                {
                    
                    if (param2 == 1)
                    {
                        _loc_4 = _loc_4 + int(this.arr[param1.level + "#" + _loc_5].attadd);
                    }
                    else if (param2 == 2)
                    {
                        _loc_4 = _loc_4 + int(this.arr[param1.level + "#" + _loc_5].defadd);
                    }
                    else if (param2 == 3)
                    {
                        _loc_4 = _loc_4 + int(this.arr[param1.level + "#" + _loc_5].hpadd);
                    }
                    else if (param2 == 4)
                    {
                        _loc_4 = _loc_4 + int(this.arr[param1.level + "#" + _loc_5].mpadd);
                    }
                    _loc_5++;
                }
            }
            return _loc_4;
        }// end function

    }
}
